package com.lutzyt.delivery.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券
 * @author zyt
 */
@Data
@TableName("discount_coupon")
public class DiscountCoupon {
  /**
   *
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  private BigDecimal amount;
  /**
   * 优惠券总数
   */
  @TableField("num")
  private Integer num;
  /**
   * 剩余优惠券总数
   */
  @TableField("balance")
  private Integer balance;
  /**
   * 状态:已发布on/off未发布
   */
  @TableField("state")
  private String state;
  /**
   * 优惠券开始日期
   */
  @TableField("start_date")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date startDate;
  /**
   * 优惠券结束日期
   */
  @TableField("end_date")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date endDate;
  /**
   * 创建时间
   */
  @TableField("create_time")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  private String createName;
  /**
   * 逻辑删除
   */
  @TableField("deleted")
  private Integer deleted;
  /**
   * 版本
   */
  @TableField("fversion")
  private Integer fversion;
  /**
   * 备注
   */
  @TableField("remark")
  private String remark;

  private String audit;
}